VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
  Persistable = 0  'NotPersistable
  DataBindingBehavior = 0  'vbNone
  DataSourceBehavior  = 0  'vbNone
  MTSTransactionMode  = 0  'NotAnMTSObject
END
Attribute VB_Name = "clsContainer"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Option Explicit
Public frm As Object
Public oForm As frmToolContainer    'declare frmContainer

Public Sub LoadToContainer(pic As Long)
    Load frm                                                             'Load the form in memory
    SetParent frm.hwnd, pic                                             'Set the parent of the form to be the pic box
    frm.ScaleMode = vbPixels                                            'The MoveWindow API is in pixels..
    MoveWindow frm.hwnd, 0, 0, frm.ScaleWidth, frm.ScaleHeight, True        'Move the form into the picture box
    frm.Show                                                            'Let's see our handywork..
End Sub

Public Sub SetUpContainer(objForm As Object, lLoad As Boolean)

    If lLoad = True Then
        Set oContainer.frm = objForm
        Set oForm = frmToolContainer
        Set oForm.objChild = objForm
        Call oContainer.LoadToContainer(oForm.picContainer.hwnd)
        
        frm.Width = ITGLedgerMain.Width - ITGLedgerMain.Picture3.Width - 540
        If frm.Height < (ITGLedgerMain.Height - (ITGLedgerMain.banner.Height + 1610)) Then
            frm.Height = (ITGLedgerMain.Height - (ITGLedgerMain.banner.Height + 1610))
        Else
            frm.Height = frm.Height
        End If
        
        oForm.WindowState = 2
    
    Else
        On Error GoTo ErrHandler
        Call FrmName.TBCloseWindow

    End If
    Exit Sub

ErrHandler:
   
End Sub

Public Sub UnloadContainer()
    If FrmName.Mode <> 1 Then Unload oForm
End Sub

Public Sub ShowMyContainer()
    WheelUnHook         'dave

    FrmName.ZOrder 0
    FrmName.WindowState = 2
    
    On Error Resume Next
    WheelHook FrmName.dtgList        'dave
    
    frmToolContainer.picContainer.Width = FrmName.Width
    frmToolContainer.picContainer.Height = FrmName.Height
    If Not FrmName.Name = "frmComUnionBusinessIntelligenceUser" Then
        oForm.WindowState = 2
    End If
End Sub

Public Sub SetFormFocus()
    oForm.objChild.SetFocus
End Sub


